Domain core-dumping fixes
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 12 Mar 2009 11:09:57 +0000 (11:09 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 12 Mar 2009 11:09:57 +0000 (11:09 +0000)
commitfb0a30b839c4dbe13fafe63c47446485e86668f7
tree0d17e3ad888417eff852fa72a1673a0b6882013a
parent51494c865161cd0fe83910e5c00aaafbe34da23b
Domain core-dumping fixes

The code was attempting to use the domain's current number of pages
(info.nr_pages) as a maximum index.  We then walk the memory map and
can easily over-write past the end of the nr_pages-sized array, if the
domain has more pages mapped in than earlier (live dump).  Restrict
ourselves to the current number of pages.

Also fix the dump core method in xend to actually implement the crash
and live options.  In particular this means that xend clients other
than xm now get non-live dumps by default.

Signed-off-by: John Levon <john.levon@sun.com>
tools/libxc/xc_core.c
tools/libxc/xenctrl.h
tools/python/xen/xend/XendDomain.py
tools/python/xen/xend/XendDomainInfo.py
tools/python/xen/xm/main.py